﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <title>Index</title>
    <script type="text/javascript" defer="defer">
        var PicSildes = function (bigPicWidth, bigPicHeight, smallPicWidth, smallPicHeight) {
            var _BigPicWidth = 400;
            var _BigPicHeight = 300;
            var _SmallPicWidth = 80;
            var _SmallPicHeight = 60;
            if (typeof (bigPicWidth) == "number") {
                _BigPicWidth = bigPicWidth;
            }
            if (typeof (bigPicHeight) == "number") {
                _BigPicHeight = bigPicHeight;
            }
            if (typeof (smallPicHeight) == "number") {
                _SmallPicHeight = smallPicHeight;
            }
            if (typeof (smallPicWidth) == "number") {
                _SmallPicWidth = smallPicWidth;
            }
            this.Run = function (id, data) {
                var container = document.getElementById(id);
                if (container == null || container.nodeName.toLowerCase() != "div")
                    return;
                container.innerHTML = "";
                container.setAttribute("class", "PicSilde-Container");
                var html = "";
                html += "<div class='PicSilde-BigPicContainer'><a onclick='PicSildeBigPicClicked(this)'><img class='PicSilde-BigPic' /></a></div>";
                html += "<div class='PicSilde-SmallPicContainer'>";
                if (data.length && data.length > 0) {
                    html += "<ul>";
                    for (var i = 0; i < data.length; i++) {
                        var item = data[i];
                        html += "<li><a onclick='PicSildeSmallPicClicked(this)'><img src='" + data[i].url + "' alt='" + data[i].alt + "'></li>"
                    }
                    html += "</ul>";
                }
                html += "</div>";
                container.innerHTML = html;
            }
        }

</script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")"></script>
<script type="text/javascript">

    $(document).ready(function () {
        var item = new PicSildes(400, 300, 80, 60);
        var data = Array();
        data[0] = {
            url: "ABC",
            alt: "567"
        };
        data[1] = {
            url: "ABC",
            alt: "567"
        };
        data[2] = {
            url: "ABC",
            alt: "567"
        };
        item.Run("Fuck", data);

    })
</script>
<link type="text/css" rel="Stylesheet" href="@Url.Content("~/Css/PicSlides.css")" />
</head>
<body>
    <div id="Fuck">
    </div>
</body>
</html>
